import React from 'react'

 const MyComponent = () => {
  console.log('MyComponent 更新了')
  return (
    <div>MyComponent</div>
  )
}
// props level
const setStaticfactionClass = (level) => {
  if(level <100) {
    return "very-disssatisified"
  }
  if(level <200) {
    return "some-disssatisified"
  }
  if(level <300) {
    return "neither"
  }
  if(level <400) {
    return "somewhat-disssatisified"
  }
  return "very-satisified"
}
const isSameRange = (prevalue,nextvalue) => {
  // console.log(prevalue,nextvalue,'===')
  const preValueClass = setStaticfactionClass(prevalue.level);
  const nextValueClass = setStaticfactionClass(nextvalue.level)
  return preValueClass === nextValueClass;
}
export default React.memo(MyComponent,isSameRange)
